/**
 * 文物详情页样式
 */

* {
  font-family: 'STKaiti', 'KaiTi', serif;
}

.artifact-detail-container {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f5f0e8 0%, #faf8f3 100%);
  box-sizing: border-box;
}

.detail-scroll {
  height: 100vh;
  padding-bottom: 120px;
}

/* 3D展示区域 */
.model-viewer {
  background: linear-gradient(135deg, #B8956A 0%, #A5875F 50%, #C3A57D 100%);
  padding: clamp(20px, 5vw, 40px) clamp(15px, 4vw, 30px);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
      repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px);
    pointer-events: none;
  }
}

/* 光照控制 */
.lighting-controls {
  margin-top: clamp(20px, 4vw, 30px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: clamp(12px, 2vw, 16px);
  padding: clamp(15px, 3vw, 20px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.lighting-title {
  display: block;
  font-size: clamp(14px, 3vw, 20px);
  color: #B8956A;
  font-weight: 600;
  margin-bottom: clamp(10px, 2vw, 12px);
}

.lighting-scroll {
  white-space: nowrap;
}

.lighting-list {
  display: inline-flex;
  gap: clamp(10px, 2vw, 12px);
}

.lighting-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 8px);
  padding: clamp(8px, 1.8vw, 12px) clamp(15px, 3vw, 20px);
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(139, 69, 19, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 40px;
  overflow: hidden;
  
  &.active {
    background: rgba(139, 69, 19, 0.15);
    border-color: #B8956A;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
  }
}

.lighting-dot {
  width: clamp(14px, 3vw, 18px);
  height: clamp(14px, 3vw, 18px);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.lighting-name {
  font-size: clamp(13px, 2.8vw, 18px);
  color: #333;
  white-space: nowrap;
}

/* 文物信息 */
.artifact-info {
  padding: clamp(20px, 4vw, 30px) clamp(15px, 3vw, 25px);
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-header {
  margin-bottom: clamp(15px, 3vw, 25px);
}

.info-title {
  display: block;
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 700;
  color: #B8956A;
  margin-bottom: clamp(12px, 2.5vw, 18px);
  letter-spacing: 0.08em;
  font-family: 'STKaiti', 'KaiTi', serif;
  line-height: 1.3;
}

.info-meta {
  display: flex;
  gap: clamp(15px, 3vw, 25px);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.meta-label {
  font-size: clamp(13px, 2.8vw, 18px);
  color: #999;
  flex-shrink: 0;
}

.meta-value {
  font-size: clamp(13px, 2.8vw, 18px);
  color: #333;
  font-weight: 500;
}

/* 标签页 */
.info-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: clamp(10px, 2vw, 14px);
  padding: 4px;
  margin-bottom: clamp(20px, 4vw, 25px);
  box-shadow: 0 2px 12px rgba(139, 69, 19, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: clamp(10px, 2vw, 14px) clamp(8px, 1.5vw, 12px);
  border-radius: clamp(8px, 1.5vw, 10px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  &.active {
    background: linear-gradient(135deg, #B8956A 0%, #A5875F 100%);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    transform: scale(1.02);
    
    .tab-text {
      color: #fff;
      font-weight: 600;
    }
  }
}

.tab-text {
  font-size: clamp(14px, 3vw, 20px);
  color: #666;
  line-height: 1.3;
}

/* 内容区域 */
.info-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: clamp(12px, 2vw, 16px);
  padding: clamp(20px, 4vw, 25px);
  box-shadow: 0 2px 12px rgba(139, 69, 19, 0.08);
  min-height: 250px;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.content-story {
  .story-text {
    font-size: clamp(14px, 3vw, 20px);
    line-height: 1.8;
    color: #333;
    text-align: justify;
    letter-spacing: 0.5px;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

.content-materials {
  .material-item {
    padding: clamp(15px, 3vw, 20px);
    background: rgba(249, 249, 249, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: clamp(10px, 2vw, 12px);
    margin-bottom: clamp(12px, 2.5vw, 16px);
    border-left: 3px solid #B8956A;
    border: 1px solid rgba(139, 69, 19, 0.1);
    border-left: 3px solid #B8956A;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    overflow: hidden;
    
    &:nth-child(1) { animation-delay: 50ms; }
    &:nth-child(2) { animation-delay: 100ms; }
    &:nth-child(3) { animation-delay: 150ms; }
    
    &:last-child {
      margin-bottom: 0;
    }
    
    &:active {
      transform: translateX(5px);
    }
  }
  
  .material-name {
    display: block;
    font-size: clamp(16px, 3.5vw, 22px);
    font-weight: 600;
    color: #B8956A;
    margin-bottom: clamp(8px, 1.8vw, 12px);
    line-height: 1.3;
  }
  
  .material-description {
    display: block;
    font-size: clamp(13px, 2.8vw, 18px);
    line-height: 1.6;
    color: #666;
    word-break: break-word;
  }
}

.content-layers {
  .layer-item {
    padding: clamp(15px, 3vw, 20px);
    background: rgba(249, 249, 249, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: clamp(10px, 2vw, 12px);
    margin-bottom: clamp(12px, 2.5vw, 16px);
    border: 1px solid rgba(139, 69, 19, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    overflow: hidden;
    
    &:nth-child(1) { animation-delay: 50ms; }
    &:nth-child(2) { animation-delay: 100ms; }
    &:nth-child(3) { animation-delay: 150ms; }
    &:nth-child(4) { animation-delay: 200ms; }
    
    &:last-child {
      margin-bottom: 0;
    }
    
    &:active {
      transform: translateX(5px);
    }
  }
  
  .layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: clamp(8px, 1.8vw, 12px);
    flex-wrap: wrap;
  }
  
  .layer-name {
    font-size: clamp(16px, 3.5vw, 22px);
    font-weight: 600;
    color: #B8956A;
    line-height: 1.3;
  }
  
  .layer-depth {
    font-size: clamp(12px, 2.5vw, 16px);
    color: #999;
    flex-shrink: 0;
  }
  
  .layer-period {
    display: block;
    font-size: clamp(13px, 2.8vw, 18px);
    color: #666;
    margin-bottom: clamp(6px, 1.5vw, 8px);
  }
  
  .layer-description {
    display: block;
    font-size: clamp(13px, 2.8vw, 18px);
    line-height: 1.6;
    color: #666;
    word-break: break-word;
  }
}

/* 悬浮按钮 */
.float-button {
  position: fixed;
  bottom: clamp(80px, 15vw, 100px);
  right: clamp(20px, 4vw, 30px);
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
  padding: clamp(12px, 2.5vw, 16px) clamp(20px, 4vw, 28px);
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.4);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 10px);
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s backwards;
  
  &:active {
    transform: scale(0.92) translateY(2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
  }
}

.float-button-icon {
  font-size: clamp(20px, 4vw, 28px);
}

.float-button-text {
  font-size: clamp(14px, 3vw, 20px);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

/* 加载状态 */
.loading-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-text {
  font-size: 28px;
  color: #999;
}

